package com.xueyi.aixihu.service;

import com.xueyi.aixihu.entity.vo.FindRuleFatherVo;
import com.xueyi.aixihu.response.FindRuleByRoleResponse;
import com.xueyi.aixihu.response.base.BaseResponse;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author lvyi
 * @date : 2022/8/19
 * @Description : 权限表的service接口
 */
public interface DtAuthRuleService {

    /**
     * 根据角色id查询其权限id
     *
     * @return
     */
    FindRuleByRoleResponse findRuleByRole(Integer id);

    /**
     * 查询出树状图样的权限名称与id
     *
     * @return
     */
    BaseResponse<List<FindRuleFatherVo>> findTreeOutRule();

    /**
     * 根据角色id关联权限
     *
     * @param id     角色id
     * @param ruleId 权限id
     */
    BaseResponse<Boolean> updateRulesByRole(Integer id, String ruleId);
}
